$(function() {
	var userGrid = $("#guidang");

	// 初始化
	userGrid.datagrid({
		url: 'user/list',
		fit: true,
		rownumbers: true,
		pagination: true, // 是否显示分页栏
		columns: [
			[{
				field: 'userName',
				title: '姓名',
				width: 100
			}, {
				field: 'gender',
				title: '性别',
				width: 100,
			},{
				field: 'gender',
				title: '原因',
				width: 100,
			}, {
				field: 'tel',
				title: '试用期薪水',
				width: 100
			}, {
				field: 'dahuidate',
				title: '转正薪水',
				width: 100
			}, {
				field: 'dahuidate',
				title: '试用期',
				width: 100
			}, {
				field: 'dahuidate',
				title: '试用期',
				width: 100
			}, {
				field: 'ac',
				title: '操作',
				width: 150,
				align: 'center',
				formatter: function(value, row, index) {
					var bts = [];
					bts.push('<a data-index="' + index +
						'" class="ctr edit">编辑</a>');
					bts.push('<a data-id="' + row.id + '" data-index="' +
						index + '" class="ctr delete">删除</a>');
					return bts.join('');
				}
			}]
		],
		toolbar: [{
			iconCls: 'icon-add',
			text: "继续批阅",
			handler: function() {}
		}]
	});
});